using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Interactivity;
namespace Microsoft.Expression.Interactivity.Core
{
	[DefaultTrigger(typeof(UIElement), typeof(EventTrigger), "MouseLeftButtonDown"), DefaultTrigger(typeof(ButtonBase), typeof(EventTrigger), "Click")]
	public class NavigateToPageAction : TargetedTriggerAction<FrameworkElement>
	{
		public static readonly DependencyProperty TargetPageProperty = DependencyProperty.Register("TargetPage", typeof(string), typeof(NavigateToPageAction), new PropertyMetadata(string.Empty));
		public string TargetPage
		{
			get
			{
				return (string)base.GetValue(NavigateToPageAction.TargetPageProperty);
			}
			set
			{
				base.SetValue(NavigateToPageAction.TargetPageProperty, value);
			}
		}
		protected override void Invoke(object parameter)
		{
			INavigate navigate = Application.get_Current().get_RootVisual() as INavigate;
			navigate.Navigate(new Uri(this.TargetPage, 2));
		}
	}
}
